﻿using CollectionsJoin;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;

namespace TestCollectionsJoin
{
    [TestClass()]
    public class CollectionsExtensionsTest
    {
        public void JoinTestHelper<T>()
        {
            ICollection<T> collection = new List<T>(){default(T), default(T), default(T)};

            string expected = "[" + default(T) + "," + default(T) + "," + default(T) + "]";
            string actual;
            actual = CollectionsExtensions.Join<T>(collection);
            Assert.AreEqual(expected, actual);
        }

        [TestMethod()]
        public void JoinTest()
        {
            JoinTestHelper<string>();
            JoinTestHelper<int>();
            JoinTestHelper<double>();
            JoinTestHelper<char>();
        }
    }
}
